<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CompanyOilCard extends Model
{
    protected $table = "company_oil_card";
    protected $guarded = [];
    protected $appends = ["status_name","type_name"];

    public function getStatusNameAttribute(){
        switch ($this->status){
            case 1:
                return '已领取';
            case 0:
                return '待领取';
        }
    }

    public function getTypeNameAttribute(){
        switch ($this->type){
            case 1:
                return '中石化';
            case 2:
                return '中石油';
        }
    }

}
